<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<STYLE type="text/css">
html,body{
   height:100%;
   width:100%;
   margin:0 auto;
   overflow:hidden;
}
</STYLE>
</head>
<body>
<div id="insert_commodity_select_main" style="width:100%;height:100%;">
			<DIV id="" style="width:100%;height:0.7%;overflow:hidden;"></DIV>
			<DIV id="" style="width:100%;height:98.6%;">
					<DIV id="" class="" style="float:left;width:0.4%;height:100%;overflow:hidden;"></DIV>
					<DIV id="" class="" style="float:left;width:49.4%;height:100%;">
							<DIV id="" class="" style="width:100%;height:100%;max-height:100%;max-width:100%;border:1px solid #9ABAE9">
								<!-- 内容区 -->
											 <table id="insert_commodity_select_table"></table>
											 <div id="insert_commodity_select_table_tas" style="overflow: hidden; padding-left: 10px; padding-top: 5px; border-bottom: 1px solid #9ABAE9;padding-bottom: 5px;">
											  <a href="javascript:void(0);" class="easyui-linkbutton"   data-options="iconCls:'icon-add',plain:true" onclick="window.Commodity.addCommodity()">打印</a>||
											 
											 </div>
								<!-- 内容区 -->
							</DIV>
					</DIV>
					<DIV id="" class="" style="float:left;width:0.4%;height:100%;overflow:hidden;"></DIV>
					<DIV id="" class="" style="float:left;width:49.4%;height:100%;">
							<DIV id="" class="" style="width:100%;height:100%;max-height:100%;max-width:100%;border:1px solid #9ABAE9">
								<!-- 内容区 -->
											 <table id="insert_commodity_select_table_res"></table>
											 <div id="insert_commodity_select_table_tas_res"></div>
								<!-- 内容区 -->
							</DIV>
					</DIV>
					<DIV id="" class="" style="float:left;width:0.37%;height:100%;overflow:hidden;"></DIV>
			</DIV>
			<DIV id="" class="div_bottom"></DIV>
	</div>
</body>
<script type="text/javascript">
(function(){
	
	//创建grid入库单查询
	function createSelectOmmodtiy(){
		$('#insert_commodity_select_table').datagrid({
			fit: true,
			title:'入库单查询',
			toolbar:"#insert_commodity_select_table_tas",
			singleSelect:false,
			rownumbers: true,
			animate:true,
			striped: true,
			border:false,
			iconCls:'icon456',
			loadMsg:'正在加载数据',
			//collapsible:true,
			idField:'sysCommodity_id',
			fitColumns:true,
			columns:[[
			    {field:'sysCommodity_id',checkbox:true,width:50},	
		  		{field:'sysCommodity_name',title:'货品名称',width:120},
		  		{field:'sysCommodity_state',title:'货品状态',formatter : function(value, row, index){
					if(row.sysCommodity_state=="0"){
						return  '<font color="red">禁用</font>';
					}
					if(row.sysCommodity_state=="1"){
						return  '<font color="green">启用</font>';
					}
					return "";
					},width:120},
		  		{field:'sysCommodity_note',title:'货品描述',width:120},
		  		{field:'sysCommodity_createDate',title:'创建时间',width:120}
		  		]],
				pagination:true
			});
	};
	//创建grid入库单查询结果
	function createSelectOmmodtiyReset(){
		$('#insert_commodity_select_table_res').datagrid({
			fit: true,
			title:'入库单详细信息',
			toolbar:"#insert_commodity_select_table_tas_res",
			singleSelect:false,
			rownumbers: true,
			animate:true,
			iconCls:'icon455',
			border:false,
			striped: true,
			loadMsg:'正在加载数据',
			//collapsible:true,
			idField:'sysCommodity_id',
			fitColumns:true,
			columns:[[
			    {field:'sysCommodity_id',checkbox:true,width:50},	
		  		{field:'sysCommodity_name',title:'货品名称',width:120},
		  		{field:'sysCommodity_state',title:'货品状态',formatter : function(value, row, index){
					if(row.sysCommodity_state=="0"){
						return  '<font color="red">禁用</font>';
					}
					if(row.sysCommodity_state=="1"){
						return  '<font color="green">启用</font>';
					}
					return "";
					},width:120},
		  		{field:'sysCommodity_note',title:'货品描述',width:120},
		  		{field:'sysCommodity_createDate',title:'创建时间',width:120}
		  		]],
				pagination:true
			});
		
	};
	window.insert_commodity_select={};	
	window.insert_commodity_select.createSelectOmmodtiy=createSelectOmmodtiy;
	window.insert_commodity_select.createSelectOmmodtiyReset=createSelectOmmodtiyReset;
	$(function(){
		$.parser.parse('#insert_commodity_select_main'); 	
		createSelectOmmodtiy();
		createSelectOmmodtiyReset();
	});
		
})();


</script>
</html>